package com.webbei.Backstage.service.impl;

import java.util.List;
import java.util.Map;

import com.webbei.Backstage.dao.BackstateDao;
import com.webbei.Backstage.service.BackstateSer;
import com.webbei.pojo.Customer;
import com.webbei.pojo.Customerlimit;
import com.webbei.pojo.Industry;
import com.webbei.pojo.Managers;
import com.webbei.pojo.Ordercost;
import com.webbei.pojo.Orders;
import com.webbei.pojo.Products;
import com.webbei.pojo.Report;
import com.webbei.pojo.Userhot;

public class BackstateSerImpl implements BackstateSer {
       private BackstateDao dao;
       
       
    /*  public BackstateDao getDao() {
		return dao;
	}*/// because of AJAX

	public void setDao(BackstateDao dao) {
		this.dao = dao;
	}

	@Override
	public List<Report> relist(int start) {
		return dao.relist(start);
	}

	@Override
	public List<Managers> malist() {
		return dao.malist();
	}

	@Override
	public List<Customer> cuslist() {
		return dao.cuslist();
	}

	@Override
	public Customer findcusbyid(int id) {
		return dao.findcusbyid(id);
	}

	@Override
	public List<Customer> fenyelist(int start) {
		return dao.fenyelist(start);
	}

	@Override
	public Customer findcusbyname(String uname) {
	    return dao.findcusbyname(uname);
	}

	@Override
	public int getreortCount() {
		return dao.getreortCount();
	}

	@Override
	public int reportsuccess(String username,int count) {
		return dao.reportsuccess(username,count);
	}

	@Override
	public int reportfail(String username,int count) {
		return dao.reportfail(username,count);
	}

	@Override
	public Userhot uhot(String username) {
       return dao.uhot(username);
	}

	@Override
	public int customerlimitCount() {
		return dao.customerlimitCount();
	}

	@Override
	public List<Customerlimit> cuslimitlist(int start) {
		return dao.cuslimitlist(start);
	}

	@Override
	public int updatelimit(String name, int share, int ping, int ju, int ding) {
		return dao.updatelimit(name, share, ping, ju, ding);
	}

	@Override
	public Customerlimit cuslimi(String username) {
		return dao.cuslimi(username);
	}

	@Override
	public List<Report> getrecontent(String bename) {
		return dao.getrecontent(bename);
	}

	@Override
	public List<Industry> getallinformation() {
		return dao.getallinformation();
	}
	
	 public int addindus(String industryName,String industryAddress,String industryPrincipal,String industryTel,String industryEmail){
		 return dao.addindus(industryName, industryAddress, industryPrincipal,industryTel,industryEmail);
	 }
	 public int deleteindus(int id){
		 return dao.deleteindus(id);
	 }

	@Override
	public Industry getone(int id) {
		return dao.getone(id);
	}

	@Override
    public int updateindus(int id,String industryName,String industryAddress,String industryPrincipal,
    		String industryTel,String industryEmail){

		return dao.updateindus(id, industryName, industryAddress, industryPrincipal, industryTel, industryEmail);
	}

	@Override
	public List<Orders> orderlist(int start) {
	  return dao.orderlist(start);
	}

	@Override
	public int getOrdercount(String datetime,String indusname) {
		return dao.getOrdercount(datetime,indusname);
	}

	@Override
	public Orders getorder(int orderid) {
		return dao.getorder(orderid);
	}

	@Override
	public String getindusNamebyid(int id) {
		return dao.getindusNamebyid(id);
	}

	@Override
	public int updCDRstateAndinCdrpath(String path, int orderid) {
		return dao.updCDRstateAndinCdrpath(path, orderid);
	}

	@Override
	public List<Orders> getorderByday(String day,String indusname,int start) {
		return dao.getorderByday(day,indusname,start);
	}

	@Override
	public int getOrdercountByindusid(String datetime, int indusid,
			String uname, int orderstate) {
		
		return dao.getOrdercountByindusid(datetime, indusid, uname, orderstate);
	}

	@Override
	public List<Orders> getindusorderByday(String day, int start, int indusid,
			String uname, int orderstate) {
		// TODO Auto-generated method stub
		return dao.getindusorderByday(day, start, indusid, uname, orderstate);
	}

	@Override
	public String getconmentcontentbyid(int id) {
	    return dao.getconmentcontentbyid(id);
	}

	 public int deletecomment(int commentid){
		 return dao.deletecomment(commentid);
	 }
      
	 public String getproductNamebyid(int proid){
		 return dao.getproductNamebyid(proid);
	 }

	
	public List<Products> gotoAddindus() {
		return dao.gotoAddindus();
	}

	
	public int updatecommentIdInreport(int reportid) {
		return dao.updatecommentIdInreport(reportid);
	}

	@Override
	public List<String> proName(int indusid) {
		return dao.proName(indusid);
	}
	
	 public int insertinconpro(int indusid,int proid){
		 return dao.insertinconpro(indusid, proid);
	 }
	 
	 public int getindusIdbyName(String name){
		 return dao.getindusIdbyName(name);
	 }
	 public int deleteproidByindusid(int indusid){
		 return dao.deleteproidByindusid(indusid);
	 }

	@Override
	public List<String> moren(int indusid) {
		return dao.moren(indusid);
	}

	

	public int updatexuanzhong(int indusid, String proname) {
		return dao.updatexuanzhong(indusid, proname);
	}

	@Override
	public int updateExceptxuanzhong(int indus, String proname) {
		return dao.updateExceptxuanzhong(indus, proname);
	}

	@Override
	public List getCostnameandCostmoney(int backpicid) {
		return dao.getCostnameandCostmoney(backpicid);
	}
	
	public int updateOrderstate(int orderid){
		return dao.updateOrderstate(orderid);
	}
	
	public int updateStockout(int orderid, String liyou){
		return dao.updateStockout(orderid, liyou);
	}

	@Override
	public int updateFeedbackreson(int orderid, String reason) {
	return dao.updateFeedbackreson(orderid, reason);
	}

	@Override
	public int insertcost(Ordercost orcost) {
		return dao.insertcost(orcost);
	}
	
	public List<Orders> orderlist(int orderid,String ordername,int indusid, String time1, String time2,int start){
		return dao.orderlist(orderid,ordername,indusid, time1, time2,start);
	}
	
	 public List<Ordercost> ordercost(){
		 return dao.ordercost();
	 }
	 public Ordercost getoneordercost(int orderid){
		 return dao.getoneordercost(orderid);
	 }

	@Override
	public List<Orders> allindusorderlist(int orderid,String ordername,int indusid, String time1,
			String time2,int start) {
	return dao.allindusorderlist(orderid,ordername,indusid, time1, time2,start);
	}

	@Override
	public String get9dingid(int orderid) {
	return dao.get9dingid(orderid);
	}

	@Override
	public String chaifendingid(String dingid) {
		return dao.chaifendingid(dingid);
	}

	@Override
	public int getoneOrdercostCount(int orerid, String ordername, int indusid,
			String time1, String time2) {
		return dao.getoneOrdercostCount(orerid, ordername, indusid, time1, time2);
	}

	@Override
	public int allOrdercostCount(int orderid, String ordername, int indusid,
			String time1, String time2) {
		return dao.allOrdercostCount(orderid, ordername, indusid, time1, time2);
	}

	@Override
	public String getCdrurlByorderid(int orderid) {
		 return dao.getCdrurlByorderid(orderid);
	}

	/*@Override
	public String getcustomPicbycustomid(int customid) {
	    return dao.getcustomPicbycustomid(customid);
	}*/
}
